#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
int dsy[100005];
signed main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	scanf("%lld",&n);
	for(int i = 1;i <= n;i++)scanf("%lld",&dsy[i]);
	sort(dsy+1,dsy+1+n);
	int l=1,r=1;
	int cnt=0;
	while(r<=n){
		while(r<= n and dsy[r]==dsy[l]) r++;
		if(r>n) break;
		cnt++;
		l++,r++;
	}
	printf("%lld\n",n-cnt);
	return 0;
}
